Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for nil in (c *ServerClient) ChangeAliasIPs #556

Closed
wants to merge 1 commit into from

Conversation

Difrex
Copy link

@Difrex Difrex commented Nov 13, 2024

In some cases we can pass a nil opts.Network/*Server to ChangeAliasIPs func. Don't panic, return error instead.

@Difrex Difrex requested a review from a team as a code owner November 13, 2024 11:13
@jooola
Copy link
Member

jooola commented Nov 13, 2024

Hey, thanks for the contribution.

I am hesitant to merge those checks just in here while the rest of the library calls do not have them. I agree that the caller of this function doesn't know which values are required, but using the docs should help: https://docs.hetzner.cloud/#server-actions-change-alias-ips-of-a-network

Adding validation to all our endpoint should probably be made as a larger effort.

@jooola jooola closed this Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants